﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using agvcontroller.Log;

namespace agvcontroller.GUI
{
    public enum enumNavigation
    {
        HOME,
        SYSTEM,
        LOG,
        HELP,
        STATISTIC,
    }

    public delegate void deleOnNaviChanged(object sender , enumNavigation mode);

    /// <summary>
    /// Interaction logic for UCNavigationPanel.xaml
    /// </summary>
    public partial class UCNavigationPanel : UserControl
    {
        Logger Log = new Logger("GUI");
        public event deleOnNaviChanged OnNaviChanged;

        public UCNavigationPanel()
        {
            InitializeComponent();
        }

        private void UCNaviHome_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (OnNaviChanged != null)
            {
                OnNaviChanged(this, enumNavigation.HOME);
            }

            Log.Info("[UCNavigationPanel] Mode Change to Home");
        }

        private void UCNaviSystem_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (OnNaviChanged != null)
            {
                OnNaviChanged(this, enumNavigation.SYSTEM);
            }
            Log.Info("[UCNavigationPanel] Mode Change to System");
        }

        private void UCNaviLog_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (OnNaviChanged != null)
            {
                OnNaviChanged(this, enumNavigation.LOG);
            }
            Log.Info("[UCNavigationPanel] Mode Change to Log");
        }

        private void UCNaviHelp_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if (OnNaviChanged != null)
            {
                OnNaviChanged(this, enumNavigation.HELP);
            }
            Log.Info("[UCNavigationPanel] Mode Change to Help");
        }

        private void UCNaviStatic_Loaded(object sender, RoutedEventArgs e)
        {
            if (OnNaviChanged != null)
            {
                OnNaviChanged(this, enumNavigation.STATISTIC);
            }
            Log.Info("[UCNavigationPanel] Mode Change to Statistic");
        }
    }
}
